﻿// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "ElementUIWidget.h"
#include "ElementUISwitch.generated.h"

class SSwitch;

UCLASS(meta=(DisplayName="Switch"))
class ELEMENTUIUMG_API UElementUISwitch : public UElementUIWidget
{
	GENERATED_BODY()
public:
	UElementUISwitch();
	virtual void SynchronizeProperties() override;

public:
	UFUNCTION(BlueprintCallable,Category="ElementUI|Switch")
	void SetIconBrushColor(FColor value);

	UFUNCTION(BlueprintCallable,Category="ElementUI|Switch")
    void SetLeftLabelText(const FText& value);

	UFUNCTION(BlueprintCallable,Category="ElementUI|Switch")
    void SetLeftLabelFont(const FSlateFontInfo& value);

	UFUNCTION(BlueprintCallable,Category="ElementUI|Switch")
    void SetRightLabelText(const FText& value);

	UFUNCTION(BlueprintCallable,Category="ElementUI|Switch")
    void SetRightLabelFont(const FSlateFontInfo& value);

protected:
	virtual TSharedRef<SWidget> RebuildWidget() override;

private:
	TSharedPtr<SSwitch> SwitchSlate;

private:
	UPROPERTY(EditAnywhere, Category=Icon,meta = (AllowPrivateAccess = "true"))
	float IconWidth;

	UPROPERTY(EditAnywhere, Category=Icon,meta = (AllowPrivateAccess = "true"))
	bool IsSwitch;

	UPROPERTY(EditAnywhere, Category=Icon,meta = (AllowPrivateAccess = "true"))
	FSlateBrush IconBrush;

	UPROPERTY(EditAnywhere, Category=Icon,meta = (AllowPrivateAccess = "true"))
	FColor IconBrushColor;

	UPROPERTY(EditAnywhere, Category=LeftLabel,meta = (AllowPrivateAccess = "true"))
	FText LeftLabelText;

	UPROPERTY(EditAnywhere, Category=LeftLabel,meta = (AllowPrivateAccess = "true"))
	FSlateFontInfo LeftLabelFont;

	UPROPERTY(EditAnywhere, Category=RightLabel,meta = (AllowPrivateAccess = "true"))
	FText RightLabelText;

	UPROPERTY(EditAnywhere, Category=RightLabel,meta = (AllowPrivateAccess = "true"))
	FSlateFontInfo RightLabelFont;
};
